package modules.estoque.validation;



/**
 * A validation error.
 */
public class Error {

    String message;
    String key;

    public Error(String key, String message) {
        this.message = message;
        this.key = key;
    }
    
    /**
     * @return The translated message
     */
    public String message() {
        return message;
    }
    
    /**
     * @return The field name
     */
    public String getKey() {
        return key;
    }
    
    @Override
    public String toString() {
        return message();
    }

}
